﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.List<CarBooker.Models.Hotel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                HotelID
            </th>
            <th>
                HotelName
            </th>
            <th>
                LocationId
            </th>
        </tr>

    <%foreach (CarBooker.Models.Hotel item in Model) { %>
    

        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.HotelID }) %> |
                <%= Html.ActionLink("Details", "Details", new { id=item.HotelID })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id=item.HotelID })%>
            </td>
            <td>
                <%= Html.Encode(item.HotelID) %>
            </td>
            <td>
                <%= Html.Encode(item.HotelName) %>
            </td>
            <td>
                <%= Html.Encode(item.LocationId) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

